<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*,com.model.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
		<%
		ArrayList al = (ArrayList)session.getAttribute("list");
		String id = request.getParameter("id");
		for(int i = 0; i<al.size(); i++){
			Product p =(Product) al.get(i);
			if(p.getId().equals(id)){
				al.remove(i);
				break;
			}
		}
		session.setAttribute("list", al);
		response.sendRedirect("showProduct.jsp");
		%>
</body>
</html>